package com.blb.service.impl;

import com.blb.entity.Certificate;
import com.blb.mapper.CertificateMapper;
import com.blb.service.ICertificateService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author ZhengSanNan
 * @since 2019-12-24
 */
@Service
public class CertificateServiceImpl extends ServiceImpl<CertificateMapper, Certificate> implements ICertificateService {

    @Resource
    private CertificateMapper certificateMapper;

    @Override
    public Certificate findUserByCertificate(String certificate) {
        return certificateMapper.findUserByCertificate(certificate);
    }

    @Override
    public void updateToken(String certificate, String token) {
        certificateMapper.updateToken(certificate,token);
    }
}
